package com.xk857.simpleeffect.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 意见反馈
 */
public class Opinion implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 1BUG 2意见
     */
    private Integer type;

    /**
     * 反馈内容
     */
    private String content;

    /**
     * 0未处理 1处理中 2已解决 3无法重现 4已采纳
     */
    private Integer status;

    /**
     * 逻辑删除
     */
    private Boolean deleted;

    /**
     * 作者回复
     */
    private String reply;

//    private String imgs;

    /**
     * 客户id
     */
    private Long customerId;


    /**
     * 创建时间
     */
    private List<Integer> createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public LocalDateTime getCreateTime() {
        if (createTime.size() == 5) {
            return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), 0);
        }
        return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), createTime.get(5));
    }

    public void setCreateTime(List<Integer> createTime) {
        this.createTime = createTime;
    }
}